Optimal. Leaf size=90 \[ \frac{(4 A+B) \tan ^3(e+f x)}{15 a^3 c^2 f}+\frac{(4 A+B) \tan (e+f x)}{5 a^3 c^2 f}-\frac{(A-B) \sec ^3(e+f x)}{5 c^2 f \left (a^3 \sin (e+f x)+a^3\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.204458, antiderivative size = 90, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {2967, 2859, 3767} \[ \frac{(4 A+B) \tan ^3(e+f x)}{15 a^3 c^2 f}+\frac{(4 A+B) \tan (e+f x)}{5 a^3 c^2 f}-\frac{(A-B) \sec ^3(e+f x)}{5 c^2 f \left (a^3 \sin (e+f x)+a^3\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2967
Rule 2859
Rule 3767
Rubi steps
\begin{align*} \int \frac{A+B \sin (e+f x)}{(a+a \sin (e+f x))^3 (c-c \sin (e+f x))^2} \, dx &=\frac{\int \frac{\sec ^4(e+f x) (A+B \sin (e+f x))}{a+a \sin (e+f x)} \, dx}{a^2 c^2}\\ &=-\frac{(A-B) \sec ^3(e+f x)}{5 c^2 f \left (a^3+a^3 \sin (e+f x)\right )}+\frac{(4 A+B) \int \sec ^4(e+f x) \, dx}{5 a^3 c^2}\\ &=-\frac{(A-B) \sec ^3(e+f x)}{5 c^2 f \left (a^3+a^3 \sin (e+f x)\right )}-\frac{(4 A+B) \operatorname{Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (e+f x)\right )}{5 a^3 c^2 f}\\ &=-\frac{(A-B) \sec ^3(e+f x)}{5 c^2 f \left (a^3+a^3 \sin (e+f x)\right )}+\frac{(4 A+B) \tan (e+f x)}{5 a^3 c^2 f}+\frac{(4 A+B) \tan ^3(e+f x)}{15 a^3 c^2 f}\\ \end{align*}
Mathematica [B] time = 0.985886, size = 237, normalized size = 2.63 \[ \frac{\left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right ) \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right ) (54 (A-B) \cos (e+f x)-32 (4 A+B) \cos (2 (e+f x))+384 A \sin (e+f x)+18 A \sin (2 (e+f x))+128 A \sin (3 (e+f x))+9 A \sin (4 (e+f x))+18 A \cos (3 (e+f x))-64 A \cos (4 (e+f x))+96 B \sin (e+f x)-18 B \sin (2 (e+f x))+32 B \sin (3 (e+f x))-9 B \sin (4 (e+f x))-18 B \cos (3 (e+f x))-16 B \cos (4 (e+f x))+240 B)}{960 a^3 c^2 f (\sin (e+f x)-1)^2 (\sin (e+f x)+1)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.08, size = 185, normalized size = 2.1 \begin{align*} 2\,{\frac{1}{f{a}^{3}{c}^{2}} \left ( -1/3\,{\frac{A/4+B/4}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) -1 \right ) ^{3}}}-1/2\,{\frac{A/4+B/4}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) -1 \right ) ^{2}}}-{\frac{1}{\tan \left ( 1/2\,fx+e/2 \right ) -1} \left ({\frac{5\,A}{16}}+3/16\,B \right ) }-1/4\,{\frac{-2\,A+2\,B}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) ^{4}}}-1/5\,{\frac{A-B}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) ^{5}}}-1/2\,{\frac{-3/2\,A+B}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) ^{2}}}-1/3\,{\frac{5/2\,A-2\,B}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) ^{3}}}-{\frac{1}{\tan \left ( 1/2\,fx+e/2 \right ) +1} \left ({\frac{11\,A}{16}}-3/16\,B \right ) } \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.06267, size = 878, normalized size = 9.76 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.75245, size = 262, normalized size = 2.91 \begin{align*} -\frac{2 \,{\left (4 \, A + B\right )} \cos \left (f x + e\right )^{4} -{\left (4 \, A + B\right )} \cos \left (f x + e\right )^{2} -{\left (2 \,{\left (4 \, A + B\right )} \cos \left (f x + e\right )^{2} + 4 \, A + B\right )} \sin \left (f x + e\right ) - A - 4 \, B}{15 \,{\left (a^{3} c^{2} f \cos \left (f x + e\right )^{3} \sin \left (f x + e\right ) + a^{3} c^{2} f \cos \left (f x + e\right )^{3}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.20683, size = 317, normalized size = 3.52 \begin{align*} -\frac{\frac{5 \,{\left (15 \, A \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 9 \, B \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 24 \, A \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 12 \, B \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 13 \, A + 7 \, B\right )}}{a^{3} c^{2}{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1\right )}^{3}} + \frac{165 \, A \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 45 \, B \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} + 480 \, A \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 60 \, B \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 650 \, A \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 70 \, B \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 400 \, A \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 20 \, B \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 113 \, A - 13 \, B}{a^{3} c^{2}{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1\right )}^{5}}}{120 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]